package com.jichangxiu.server.platform.service;

import com.jichangxiu.common.entity.bo.PageData;
import com.jichangxiu.framework.mybatis.BaseService;
import com.jichangxiu.server.platform.entity.dto.PlatformPostQueryDto;
import com.jichangxiu.server.platform.entity.po.PlatformPost;
import com.jichangxiu.server.platform.entity.vo.PlatformPostAddVo;
import com.jichangxiu.server.platform.entity.vo.PlatformPostEditVo;
import com.jichangxiu.server.platform.entity.vo.PlatformPostQueryVo;

import javax.validation.constraints.NotBlank;
import java.util.List;

/**
 * PlatformPostService:
 *
 * @author Jcx
 * @create 2023-03-08 21:13
 */
public interface PlatformPostService extends BaseService<PlatformPost> {

    /**
     * 新增岗位
     *
     * @param platformPostAddVo 岗位视图对象
     * @return 是否成功
     */
    public Boolean add(PlatformPostAddVo platformPostAddVo);

    /**
     * 多选级联删除岗位
     *
     * @param postIdList 岗位ID列表
     * @return 是否成功
     */
    public Boolean del(List<String> postIdList);

    /**
     * 修改岗位信息
     *
     * @param platformPostEditVo 岗位视图对象
     * @return 是否成功
     */
    public Boolean edit(PlatformPostEditVo platformPostEditVo);

    /**
     * 根据ID获取岗位详情
     *
     * @param postId 岗位ID
     * @return 岗位详情
     */
    public PlatformPostQueryDto info(@NotBlank(message = "岗位ID不能为空") String postId);

    /**
     * 分页查询岗位列表
     *
     * @param platformPostQueryVo 岗位视图对象
     * @return 分页岗位列表
     */
    public PageData<PlatformPostQueryDto> pageList(PlatformPostQueryVo platformPostQueryVo);

}
